package com.vkmessenger.gui.activities.contacts;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TabHost;
import com.vkmessenger.R;
import com.vkmessenger.gui.components.TabButtonFactory;

/**
 * Created by IntelliJ IDEA.
 * User: Evgeniy Krasko
 * Date: 24.05.12
 * Time: 9:12
 */
public class ContactsActivity extends TabActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.contacts);

        TabHost tabHost = getTabHost();
        TabHost.TabSpec spec;
        Intent intent;


        View view = TabButtonFactory.getTopTabButton(getApplicationContext(), "Друзья");
        intent = new Intent().setClass(this, FriendsActivity.class);
        spec = tabHost.newTabSpec("friends").setIndicator(view).setContent(intent);
        tabHost.addTab(spec);

        view = TabButtonFactory.getTopTabButton(getApplicationContext(), "Онлайн");
        intent = new Intent().setClass(this, OnlineActivity.class);
        spec = tabHost.newTabSpec("online").setIndicator(view).setContent(intent);
        tabHost.addTab(spec);

        view = TabButtonFactory.getTopTabButton(getApplicationContext(), "Контакты");
        intent = new Intent().setClass(this, PhoneNumbersActivity.class);
        spec = tabHost.newTabSpec("contacts").setIndicator(view).setContent(intent);
        tabHost.addTab(spec);

        tabHost.setCurrentTab(0);
    }
}
